﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ArgusLight.Drawing
{
	public struct ImageIndex
	{
		int index;
		int width;

		public ImageIndex(int index, int Width)
		{
			this.index = index;
			this.width = Width;
		}

		public ImageIndex(int x, int y, int Width)
		{
			this.index = y * Width + x;
			this.width = Width;
		}

		public int Index { get { return this.index; } }
		public int X { get { return this.index % this.width; } }
		public int Y { get { return this.index / this.width; } }
	}
}
